package sql.record;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation specifies the sql type of a field.
 * When trying to insert a record to the database, we create a class, whose
 * fields are elements of the schema. Each field is annotated with the following
 * annotation while specifying the sql type of it.  
 * In this manner we are able to add meta information and change types easily   
 * @author Ron Galay
 *
 */
@Retention(RetentionPolicy.RUNTIME)		// availability via runtime
@Target(ElementType.FIELD)				// what to mark
public @interface SQLType {
	
	String type();						// marks the type of the field
	boolean primeKey() default false; 	// marks the field as a key 
	boolean searchBy() default false;	// marks the field to search the record by
	
}
